+2006-12-24 Matthias Clasen <mclasen@redhat.com>
+
+ * gtk/gtkhandlebox.c (draw_textured_frame): Draw the
+ handle with the right orientation, depending on the
+ position of the handlebox. (#159764, Benjamin Berg)
+
2006-12-24 Behdad Esfahbod <behdad@gnome.org>
* gtk/gtkstyle.c (gtk_border_copy), (gtk_border_free): Use gslice for
static void
draw_textured_frame (GtkWidget *widget, GdkWindow *window, GdkRectangle *rect, GtkShadowType shadow,
- GdkRectangle *clip)
+ GdkRectangle *clip, GtkOrientation orientation)
{
gtk_paint_handle (widget->style, window, GTK_STATE_NORMAL, shadow,
clip, widget, "handlebox",
rect->x, rect->y, rect->width, rect->height,
- GTK_ORIENTATION_VERTICAL);
+ orientation);
}
void
GdkRectangle rect;
GdkRectangle dest;
gint handle_position;
+ GtkOrientation handle_orientation;
bin = GTK_BIN (widget);
hb = GTK_HANDLE_BOX (widget);
rect.y = 0;
rect.width = DRAG_HANDLE_SIZE;
rect.height = height;
+ handle_orientation = GTK_ORIENTATION_VERTICAL;
break;
case GTK_POS_RIGHT:
rect.x = width - DRAG_HANDLE_SIZE;
rect.y = 0;
rect.width = DRAG_HANDLE_SIZE;
rect.height = height;
+ handle_orientation = GTK_ORIENTATION_VERTICAL;
break;
case GTK_POS_TOP:
rect.x = 0;
rect.y = 0;
rect.width = width;
rect.height = DRAG_HANDLE_SIZE;
+ handle_orientation = GTK_ORIENTATION_HORIZONTAL;
break;
case GTK_POS_BOTTOM:
rect.x = 0;
rect.y = height - DRAG_HANDLE_SIZE;
rect.width = width;
rect.height = DRAG_HANDLE_SIZE;
+ handle_orientation = GTK_ORIENTATION_HORIZONTAL;
break;
}
if (gdk_rectangle_intersect (event ? &event->area : area, &rect, &dest))
draw_textured_frame (widget, hb->bin_window, &rect,
GTK_SHADOW_OUT,
- event ? &event->area : area);
+ event ? &event->area : area,
+ handle_orientation);
if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
(* GTK_WIDGET_CLASS (gtk_handle_box_parent_class)->expose_event) (widget, event);